/**
 * 
 */
package com.org.javabody.ListApi.delrepeatlist;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;

/**
 * @author Administrator
 *
 */
public class DelRepeatList {

	
	public List<String> delRepeat() {
		List<String> list = new ArrayList<String>();
		list.add("100");
		list.add("101");
		list.add("101");
		list.add("101");
		list.add("105");
		list.add("200");
		list.add("200");
		list.add("200");
		list.add("300");
		list.add("400");
		return list;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<String> list = new DelRepeatList().delRepeat();
		HashSet<String> hs = new HashSet<String>(list); //此时已经去掉重复的数据保存在hashset中
		System.out.print(hs);
		for(int x=0; x < hs.size(); x++) {
			Iterator<String> iterator=hs.iterator();
			while(iterator.hasNext()){
				String aae140 = iterator.next();
			}
		}
		String aae140 = "";
		List<String> x = JSON.parseArray(aae140,String.class);
		
	}

}
